PROCESSORS=dbc/InvariantProcessor.java dbc/PostProcessor.java dbc/PreProcessor.java
EXCEPTIONS=dbc/InvariantException.java dbc/PostConditionException.java dbc/PreConditionException.java
ANNOTATIONS=dbc/Pre.java dbc/Post.java dbc/Invariant.java

SOURCES=Test.java

ASPECTS=aspects/*.aj

JAVAC=javac
ASPECTJ=ajc
AJOPTS=-1.5 -inpath ./

all: process build

process: anno except
	$(JAVAC) $(PROCESSORS)
	$(JAVAC) -processor dbc.PostProcessor,dbc.PreProcessor,dbc.InvariantProcessor $(SOURCES)

anno:
	$(JAVAC) $(ANNOTATIONS)

except: 
	$(JAVAC) $(EXCEPTIONS)

build:	process
	$(ASPECTJ) $(AJOPTS) $(ASPECTS) $(SOURCES)

clean:
	rm -rf aspects *.class ./dbc/*.class
